﻿@model Dexter.Web.Mvc.ViewModel.Backoffice.ViewsData.SettingsController.SiteViewData
@{
	ViewBag.Title = "Site";
	Layout = "~/Areas/Admin/Views/Shared/_BackOffice.cshtml";
}

 <section class="grid_12">
	@if (!ViewData.ModelState.IsValid) {
		<ul class="message error no-margin">
			@Html.ValidationSummary()
		</ul>
	}

	<div class="block-border">
		<form action="" method="post" id="simple_form" class="block-content form">
			<h1>Setup Configuration</h1>

			@Html.AntiForgeryToken()

			<fieldset class="grey-bg required">
					<legend>Required Fields</legend>

					<p>
						<label for="simple-required">Blog Name</label>
						@Html.TextBoxFor(x => x.ConfigurationBinder.BlogName, new { @class = "full-width", placeholder = "Write here the title of the post" })
					</p>

					<p>
						<label for="simple-required">Default Title</label>
						@Html.TextBoxFor(x => x.ConfigurationBinder.DefaultTitle, new { @class = "full-width", placeholder = "Write here the title of the post" })
					</p>

					<p>
						<label for="simple-required">Default Description</label>
						@Html.TextAreaFor(x => x.ConfigurationBinder.DefaultDescription, new { @class = "full-width", rows = "5" })
					</p>

					<p>
						<label for="simple-required">Default Keywords</label>
						@Html.TextAreaFor(x => x.ConfigurationBinder.DefaultKeyWords, new { @class = "full-width", rows = "5" })
					</p>

					<p>
						<label for="simple-required">CopyRight</label>
						@Html.TextBoxFor(x => x.ConfigurationBinder.CopyRight, new { @class = "full-width", placeholder = "Write here the title of the post" })
					</p>

					<p>
						<label for="simple-required">Language</label>
						@Html.DropDownListFor(x => x.ConfigurationBinder.Language, Model.Languages.Select(x => new SelectListItem { Text = x, Value = x, Selected = (x == Model.ConfigurationBinder.Language) }), new { @class = "full-width" })
					</p>

					<p>
						<label for="simple-required">TimeZone</label>
						@Html.DropDownListFor(x => x.ConfigurationBinder.TimeZone, Model.TimesZone.Select(x => new SelectListItem { Text = x.DisplayName, Value = x.Id, Selected = (x.Id == Model.ConfigurationBinder.TimeZone) }), new { @class = "full-width" })
					</p>

					<p>
						<label for="simple-required">CultureInfo</label>
						@Html.DropDownListFor(x => x.ConfigurationBinder.CultureInfo, Model.CultureInfos.Select(x => new SelectListItem { Text = x.DisplayName, Value = x.TwoLetterISOLanguageName, Selected = (x.Name == Model.ConfigurationBinder.CultureInfo) }), new { @class = "full-width" })
					</p>

					<p>
						<label for="simple-required">Theme</label>
						@Html.DropDownListFor(x => x.ConfigurationBinder.ThemeName, Model.Themes.Select(x => new SelectListItem { Text = x, Value = x, Selected = (x == Model.Configuration.ThemeName) }), new { @class = "full-width" })
					</p>

			</fieldset>

			<fieldset class="grey-bg collapsed">
				<legend><a href="#">Notification</a></legend>

				<p>
					<label for="simple-required">Notification Email Address</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.NotificationEmailAddress, new { @class = "full-width", placeholder = "Write here email address of the notification target." })
				</p>

				<p>
					<label for="simple-required">Sender Email</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.SenderEmail, new { @class = "full-width", placeholder = "Write here the email address of the email sender" })
				</p>

				<p>
					<label for="simple-required">Sender Email Display Name</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.SenderEmailDisplayName, new { @class = "full-width", placeholder = "Write here the name of the sender" })
				</p>

				<p>
					<label for="table-display" style="display:inline">Notify New Comment</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.NotifyNewComment, new { @class = "mini-switch" })
					&nbsp;
					<label for="table-display" style="display:inline">Notify New Trackback</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.NotifyNewTrackback, new { @class = "mini-switch" })
					&nbsp;
				</p>

			</fieldset>

			<fieldset class="grey-bg collapsed">
				<legend><a href="#">PingBack & Trackback</a></legend>
				<p>
					<label for="table-display" style="display:inline">Enable PingBack Receive</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.EnablePingBackReceive, new { @class = "mini-switch" })
					&nbsp;
					<label for="table-display" style="display:inline">Enable PingBack Send</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.EnablePingBackSend, new { @class = "mini-switch" })
					&nbsp;
					<label for="table-display" style="display:inline">Enable TrackBack Send</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.EnableTrackBackReceive, new { @class = "mini-switch" })
					&nbsp;
					<label for="table-display" style="display:inline">Enable TrackBack Send</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.EnableTrackBackSend, new { @class = "mini-switch" })
					&nbsp;
					<label for="table-display" style="display:inline">Enable Referrer Tracking</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.EnableReferrerTracking, new { @class = "mini-switch" })
					&nbsp;
				</p>
					
			</fieldset>

			<fieldset class="grey-bg collapsed">
				<legend><a href="#">Captcha & AntiSpam</a></legend>

				<p>
					<label for="simple-required">Moderation Type</label>
					@Html.DropDownListFor(x => x.ConfigurationBinder.ModerationType, Model.ModerationType.Select(x => new SelectListItem { Text = x.Value, Value = x.Key.ToString(), Selected = (x.Key == Model.ConfigurationBinder.ModerationType) }), new { @class = "full-width" })
				</p>

				<p>
					<label for="simple-required">Disable comments after: (days)</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.DayBeforeDisableComment, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="table-display" style="display:inline">Enable ReCaptcha</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.ReCaptcha.Enable, new { @class = "mini-switch" })
				</p>

				<p>
					<label for="simple-required">ReCaptcha PrivateKey</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.ReCaptcha.PrivateKey, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">ReCaptcha PublicKey</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.ReCaptcha.PublicKey, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">ReCaptcha Theme</label>
					@Html.DropDownListFor(x => x.ConfigurationBinder.ReCaptcha.Theme, Model.RecaptchaThemes.Select(x => new SelectListItem { Text = x, Value = x, Selected = (x == Model.ConfigurationBinder.ReCaptcha.Theme) }), new { @class = "full-width" })
				</p>

				<p>
					<label for="simple-required">Akismet Api Key</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.AkismetApiKey, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

			</fieldset>

			<fieldset class="grey-bg collapsed">
				<legend><a href="#">SMTP</a></legend>

				<p>
					<label for="simple-required">Smtp Configuration Host</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.Smtp.SmtpConfigurationHost, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">Smtp Configuration Username</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.Smtp.SmtpConfigurationUsername, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">Smtp Configuration Password</label>
					@Html.PasswordFor(x => x.ConfigurationBinder.Smtp.SmtpConfigurationPassword, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">Smtp Configuration Port</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.Smtp.SmtpConfigurationPort, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="table-display" style="display:inline">UseSSL</label>
					@Html.CheckBoxFor(x => x.ConfigurationBinder.Smtp.SmtpConfigurationUseSsl, new { @class = "mini-switch" })
				</p>

			</fieldset>

			<fieldset class="grey-bg collapsed">
				<legend><a href="#">Various</a></legend>

				<p>
					<label for="simple-required">FeedBurner Url</label>
					@Html.TextBoxFor(x => x.ConfigurationBinder.FeedBurnerUrl, new { @class = "full-width", placeholder = "Write here the title of the post" })
				</p>

				<p>
					<label for="simple-required">Header Code</label>
					@Html.TextAreaFor(x => x.ConfigurationBinder.HeaderCode, new { @class = "full-width", rows = "10" })
				</p>

				<p>
					<label for="simple-required">Footer Code</label>
					@Html.TextAreaFor(x => x.ConfigurationBinder.FooterCode, new { @class = "full-width", rows = "10" })
				</p>

			</fieldset>

			<p class="input-with-button">
				<button type="submit">Save</button>
			</p>

		</form>
	</div>
 
 </section>
